#include "config.h"
+#include <math.h>
+
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssenumvalueprivate.h"
/* [GTK_CSS_MS] = */ "ms",
};
- g_ascii_dtostr (buf, sizeof (buf), number->value);
- g_string_append (string, buf);
- if (number->value != 0.0)
- g_string_append (string, names[number->unit]);
+ if (isinf (number->value))
+ g_string_append (string, "infinite");
+ else
+ {
+ g_ascii_dtostr (buf, sizeof (buf), number->value);
+ g_string_append (string, buf);
+ if (number->value != 0.0)
+ g_string_append (string, names[number->unit]);
+ }
}
static const GtkCssValueClass GTK_CSS_VALUE_NUMBER = {